import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

let store = new Vuex.Store({
    state: {
        id: '0',
        username: '未登录'
    },
    mutations: {
        setUsername(state, name) {
            state.username = name;
        },
        setId(state, id) {
            state.id = id;
        }
    }
})
export default store;